﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Logistics.Model;
using Logistics.Pageing;

namespace Logistics.PersonnelMatters
{
    public interface IPersonnelMattersRepository
    {
        #region 人事看板
		// <summary>
        /// 入职人数
        /// </summary>
        /// <returns></returns>
        Task<int> InductionCount();


        /// <summary>
        /// 离职人数
        /// </summary>
        /// <returns></returns>
        Task<int> DimissionCount();

        /// <summary>
        /// 总人数
        /// </summary>
        /// <returns></returns>
        Task<int> Headcount();


        /// <summary>
        /// 获取员工年龄比
        /// </summary>
        /// <returns></returns>
        Task<List<AgeRatio>> GetEmployeeAgeRatio();

        /// <summary>
        /// 获取员工工龄比
        /// </summary>
        /// <returns></returns>
        Task<List<AgeRatio>> GetSeniorityRatio();

        /// <summary>
        /// 获取部门人数
        /// </summary>
        /// <returns></returns>
        Task<List<NumberOfDepartments>> GetDepartment();

        /// <summary>
        /// 获取离职人数
        /// </summary>
        /// <returns></returns>
        Task<List<AgeRatio>> GetNumberOfSeparations();
        #endregion

        /// <summary>
        /// 获取部门集合
        /// </summary>
        /// <returns></returns>
        Task<List<Deptinfo>> GetDeptinfoList();

        /// <summary>
        /// 获取职位集合
        /// </summary>
        /// <returns></returns>
        Task<List<PositionInfo>> GetPositionInfoList(int id);

        #region 人事登记
        /// <summary>
        /// 获取员工数据
        /// </summary>
        /// <param name="name">通过员工名称进行模糊查询</param>
        /// <param name="phone">通过员工手机号进行模糊查询</param>
        /// <param name="departmentId">通过部门进行查询</param>
        /// <param name="category">通过类别进行查询</param>
        /// <param name="positionId">通过职位进行查询</param>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">页容量</param>
        /// <returns></returns>
        Task<BasucPageIng> GetBasicList(string name, string phone, int departmentId, string category, int positionId, int pageIndex, int pageSize);


        /// <summary>
        /// 删除员工数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> DelBasicById(string id);

        /// <summary>
        /// 新增员工
        /// </summary>
        /// <param name="basic"></param>
        /// <returns></returns>
        Task<int> AddBasic(Basic basic);


        /// <summary>
        /// 根据编号获取员工数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<Basic> GetBasicById(int id);

        /// <summary>
        /// 修改员工数据
        /// </summary>
        /// <param name="basic"></param>
        /// <returns></returns>
        Task<int> PutBasic(Basic basic);
        #endregion

        #region 入职
        /// <summary>
        /// 新增入职记录
        /// </summary>
        /// <param name="entry"></param>
        /// <returns></returns>
        Task<int> AddEntryData(Entry entry);

        /// <summary>
        /// 通过部门编号获取该部门的员工数据
        /// </summary>
        /// <param name="depId"></param>
        /// <returns></returns>
        Task<List<Basic>> GetBasicByDepId(int depId);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="name"></param>
        /// <param name="depId"></param>
        /// <param name="postId"></param>
        /// <param name="state"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<EntryPageIng> GetEntryList(string name, int depId, int postId, int state, int pageIndex, int pageSize);

        /// <summary>
        /// 删除入职数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> DelEntryById(string id);

        /// <summary>
        /// 通过编号获取入职数据
        /// </summary>
        /// <param name="id"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        Task<Entry> GetEntryData(int id,int state);

        /// <summary>
        /// 修改入职数据
        /// </summary>
        /// <param name="entry"></param>
        /// <returns></returns>
        Task<int> PutEntry(Entry entry);

        /// <summary>
        /// 提交入职申请
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> SubmitEntry(int id);


        #endregion


        #region 转正

        /// <summary>
        /// 新增转正记录
        /// </summary>
        /// <param name="become"></param>
        /// <returns></returns>
        Task<int> AddBecomeData(Become become);

        /// <summary>
        /// 通过部门编号获取该部门的员工数据
        /// </summary>
        /// <param name="depId"></param>
        /// <returns></returns>
        Task<List<Become>> GetBecomeByDepId(int depId);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="name"></param>
        /// <param name="depId"></param>
        /// <param name="postId"></param>
        /// <param name="state"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<BecomePageIng> GetBecomeList(string name, int depId, int postId, int state, int pageIndex, int pageSize);

        /// <summary>
        /// 删除转正数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> DelBecomeById(string id);

        /// <summary>
        /// 通过编号获取转正数据
        /// </summary>
        /// <param name="id"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        Task<Become> GetBecomeData(int id, int state);

        /// <summary>
        /// 修改转正数据
        /// </summary>
        /// <param name="entry"></param>
        /// <returns></returns>
        Task<int> PutBecome(Become become);

        /// <summary>
        /// 提交转正申请
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> SubmitBecome(int id);


        #endregion


        #region 离职

        /// <summary>
        /// 新增离职记录
        /// </summary>
        /// <param name="dimission"></param>
        /// <returns></returns>
        Task<int> AddDimissionData(Dimission dimission);

        /// <summary>
        /// 通过部门编号获取该部门的员工数据
        /// </summary>
        /// <param name="depId"></param>
        /// <returns></returns>
        Task<List<Dimission>> GetDimissionByDepId(int depId);

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="name"></param>
        /// <param name="depId"></param>
        /// <param name="postId"></param>
        /// <param name="state"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<DimissionPageIng> GetDimissionList(string name, int depId, int postId, int state, int pageIndex, int pageSize);

        /// <summary>
        /// 删除离职数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> DelDimissionById(string id);

        /// <summary>
        /// 通过编号获取离职数据
        /// </summary>
        /// <param name="id"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        Task<Dimission> GetDimissionData(int id, int state);

        /// <summary>
        /// 修改离职数据
        /// </summary>
        /// <param name="dimission"></param>
        /// <returns></returns>
        Task<int> PutDimission(Dimission dimission);

        /// <summary>
        /// 提交离职申请
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<int> SubmitDimission(int id);


        #endregion
    }
}
